"""本地缓存类"""

class LocalCache:
    # 本地缓存
    _local_cache = {}
    @staticmethod
    def get(key):
        """
        获取缓存值
        :param key: 缓存键
        :return: 缓存值
        """
        return LocalCache._local_cache.get(key)

    @staticmethod
    def set(key, value, expire=300):
        """
        设置缓存值
        :param key: 缓存键
        :param value: 缓存值
        :param expire: 过期时间（秒）
        :return: None
        """
        LocalCache._local_cache[key] = {'value': value, 'expire': expire}
